#include <stdio.h>
#include <time.h>
#include <stdlib.h>
int main()
{
    long *p = NULL;
    p = (long *)malloc(sizeof(long));
    struct tm *ret;
    *p = time(NULL);
    ret = localtime(p);
    printf("%d\n", ret->tm_year + 1900);
    printf("%d\n", ret->tm_hour);
    printf("%d\n", ret->tm_min);
    printf("%d\n", ret->tm_sec);
    return 0;
}